package vue;
import java.awt.Image;
import java.net.URL;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
public class Icone extends ImageIcon {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public Icone() {
		super();
	}
	public Icone(Image image) {
		super(image);
	}
	public Icone(String filename) {
		super(filename);
	}
	public Icone(URL location) {
		super(location);
	}
	public Icone resize(double x){
		Image img=getImage().getScaledInstance((int)(getImage().getWidth(null)*x),
				(int)(getImage().getHeight(null)*x),
				Image.SCALE_DEFAULT);
		return new Icone(img);
	}
	public Icone resize(int w,int h,double x){
		Image img=getImage().getScaledInstance((int)(w*x),(int)(h*x),Image.SCALE_DEFAULT);
		return new Icone(img);
	}
	public Icone resize(JFrame frame, double x){
		return resize(frame.getWidth(),frame.getHeight(),x);
	}
}
